'''
Created on 23/04/2009

@author: eh01
'''

from abc import ABCMeta, abstractmethod

class DSODAO(object):
    '''
    classdocs
    '''
    __metaclass__ = ABCMeta

    def __init__(self):
        '''
        Constructor
        '''
    
    @abstractmethod
    def save(self, dsos):
        pass
    
    @abstractmethod
    def find_by_id_and_version(self, id, version):
        pass
    
    @abstractmethod
    def find_by_ids(self, ids):
        pass
    
    @abstractmethod
    def find_by_URI_and_version(self, uri, version):
        pass
    
    @abstractmethod
    def find_by_URIs(self, uris):
        pass
    
    @abstractmethod
    def find_versions(self, id):
        pass
    
class DAOException(Exception):
    pass

class UpdateDAOException(DAOException):
    pass

class NotFoundDAOException(DAOException):
    pass

class ConcurrencyDAOException(DAOException):
    pass